<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

/**
 * @Constants
 */
class ErrorCode extends AbstractConstants
{
    /**
     * @Message("Server Error")
     */
    const SERVER_ERROR = 500;

    /**
     * @Message("Token 已失效")
     */
    const TOKEN_INVALID = 700;

    /**
     * @Message("越权操作")
     */
    const OPERATION_INVALID = 701;

    /**
     * @Message("参数非法")
     */
    const PARAMS_INVALID = 1000;

    /**
     * @Message("图片验证失败")
     */
    const CAPTCHA_INVALID = 1001;

    /**
     * @Message("短信验证失败")
     */
    const SMS_INVALID = 1002;

    /**
     * @Message("用户不存在")
     */
    const USER_NOT_EXISTS = 1100;

    /**
     * @Message("手机号已经注册")
     */
    const MOBILE_REGISTERED = 1101;

    /**
     * @Message("手机号或密码错误")
     */
    const USER_PASSWORD_INVALID = 1102;

    /**
     * @Message("分类非法")
     */
    const CATEGORY_INVALID = 1200;

    /**
     * @Message("问题不存在")
     */
    const QUESTION_NOT_EXIST = 1300;

    /**
     * @Message("回答不存在")
     */
    const ANSWER_NOT_EXIST = 1400;

    /**
     * @Message("评论不存在")
     */
    const REPLY_NOT_EXIST = 1500;
}
